Skip to content

Multipatch support in NewRadX#62

Open
lucass-carneiro wants to merge 10 commits intomainfrom
features/NewRadX-multipatch
Open

Multipatch support in NewRadX#62
lucass-carneiro wants to merge 10 commits intomainfrom
features/NewRadX-multipatch

Conversation

@lucass-carneiro
Copy link
Copy Markdown
Contributor

This PR adds Multipatch support to NewRadX.

This support is done in a way that no specific multipatch driver is required, i.e., it does not require CapyrX to function. It also assumes no particular patch structure or that a special radial coordinate is available. The new functionality is provided via an overloaded function of the original, and all features are opt-in.

A new parameter has been introduced, which allows one to use the BC in inner boundaries, if the patch system contains them.

@lucass-carneiro
Copy link
Copy Markdown
Contributor Author

Ticket is here

Copy link
Copy Markdown
Contributor

@chcheng3 chcheng3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me, I only have a few minor suggestions. I also appreciate that besides adding Multipatch support, the PR also makes the kernel in NewRadX_Apply easier to read by providing inline functions for computing spatial derivatives.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a use case where one would want to steer the parameter apply_inner_boundary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I can't foresee such use case at the moment, but it may be required by someone in the future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add descriptions for the new arguments introduced for the Multipatch version of NewRadX_Apply? Namely, I would like to know the what the quantities vcoordx, vJ_da_dx, etc represent. Where would they be provided? Would a thorn implementing a Multipatch infrastructure provide them, e.g. CapyrX?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added new docstrings, following the format of the original function. Please take a look and let me know if you'd like anything changed.

@lucass-carneiro lucass-carneiro requested a review from chcheng3 April 9, 2026 04:45
* @param cctkGH Pointer to Cactus grid hierarchy struct.
* @param var State variable which will have boundary conditions applied to it.
* @param rhs RHS of the evolution equation for @param var
* @param vcoordx Global x vertex coordinates grid function. Providade by
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "Providade" might be a typo on lines 39, 41, 43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants